package org.cainiao.api.lark.impl.util.converter;

import org.cainiao.api.lark.dto.response.LarkDataResponse;
import org.cainiao.api.lark.dto.response.authenticateandauthorize.getaccesstokens.AppAccessTokenResponse;
import org.cainiao.api.lark.dto.response.authenticateandauthorize.getaccesstokens.LarkTokenInfo;
import org.cainiao.api.lark.dto.response.docs.docs.apireference.document.LarkBlockPage;
import org.cainiao.api.lark.dto.response.docs.space.folder.LarkFilePage;
import org.cainiao.api.lark.dto.response.docs.space.folder.LarkFolderMeta;

import java.util.Map;

/**
 * 调用【飞书】开放平台时，使用默认的 LarkFieldNameMapResponseConverter 即可<br/>
 * 调用同样的接口，但响应字段不同，例如授权服务器的资源服务器端点响应，需要自己扩展 ResponseConverter
 */
public interface ResponseConverter {

    AppAccessTokenResponse convertToAppAccessTokenResponse(Map<String, Object> responseMap);

    LarkDataResponse<LarkTokenInfo> convertToLarkTokenInfoResponse(Map<String, Object> responseMap);

    LarkDataResponse<LarkFolderMeta> convertToLarkFolderMetaResponse(Map<String, Object> responseMap);

    LarkDataResponse<LarkFilePage> convertToLarkFilePageResponse(Map<String, Object> responseMap);

    LarkDataResponse<LarkBlockPage> convertToLarkBlockPageResponse(Map<String, Object> responseMap);
}
